package com.sample.plove.database.service;

import com.sample.plove.database.model.VipCardInfoEntity;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Optional;

/**
 * PackageName:com.sample.plove.database.service
 * Author:Administrator
 * Time:21:12
 * Date:2019/5/18
 * Describe:vip卡片数据库操作类接口
 * @author Administrator
 */

@Repository
public interface VipCardServer {

    /**
     * 添加VipCardInfo
     * @param info
     */
    public void addVipCardInfo(VipCardInfoEntity info);

    /**
     * 通过id查询VipCardInfo
     * @param id
     * @return
     */
    public Optional<VipCardInfoEntity> findVipCardInfoById(int id);

    /**
     * 获取所有的VipCardInfo列表
     * @return 返货VipCardInfo列表
     */
    public List<VipCardInfoEntity> findAllVipCardInfo();

    /**
     * 更新指定的VipCardInfo数据
     * @param entity 需要更新的AccessToken
     */
    public void updateVipCardInfo(VipCardInfoEntity entity);

    /**
     * 删除指定id的VipCardInfo
     * @param entity
     */
    public void removeVipCardInfo(VipCardInfoEntity entity);

    /**
     * 清空VipCardInfo列表
     */
    public void cleanVipCardInfo();
}
